﻿using FluentNHibernate.Mapping;
using AdventureWorks.Domain;

namespace AdventureWorks.DataAccess.Mappings
{
    public class ProductSubCategoryMapping : ClassMap<ProductSubCategory>
    {
        public ProductSubCategoryMapping() :base()
        {
            Schema("Production");
            Not.LazyLoad();
            Id(p => p.Id, "ProductSubCategoryId");
            Map(p => p.Name);
            Map(p => p.Category, "ProductCategoryId").CustomType<ProductCategory>();
        }
    }
}
